namespace Cos.Core.NHibernate.Mapping
{
    #region Usings

    using FluentNHibernate.Mapping;

    #endregion

    public class FormElementMap : ClassMap<FormElementDataModel>
    {
        #region Constructors and Destructors

        public FormElementMap()
        {
            this.Table("Form_Element");
            this.LazyLoad();
            this.Id(x => x.Id).GeneratedBy.Native().Column("ID");

            this.Map(x => x.FormId).Column("Form_ID");
            this.Map(x => x.FormPageId).Column("Page_ID");
            this.Map(x => x.Ordering).Not.Nullable().Column("Ordering");
            this.Map(x => x.InputType).Not.Nullable().Column("Input_Type");
            this.Map(x => x.Name).Not.Nullable().Column("Name");
            this.Map(x => x.IsDeleted).Not.Nullable().Column("Is_Deleted");
            this.Map(x => x.CSS).Column("CSS");
            this.Map(x => x.CssLive).Column("CSS_Live");
            this.Map(x => x.Required).Not.Nullable().Column("Required");
            this.Map(x => x.RequiredLive).Not.Nullable().Column("Required_Live");
            this.Map(x => x.Boolean1).Column("Boolean1");
            this.Map(x => x.Boolean1Live).Column("Boolean1_Live");
            this.Map(x => x.Boolean2).Column("Boolean2");
            this.Map(x => x.Boolean2Live).Column("Boolean2_Live");
            this.Map(x => x.Long1).Column("Long1");
            this.Map(x => x.Long1Live).Column("Long1_Live");
            this.Map(x => x.Long2).Column("Long2");
            this.Map(x => x.Long2Live).Column("Long2_Live");
            this.Map(x => x.Long3).Column("Long3");
            this.Map(x => x.Long3Live).Column("Long3_Live");
            this.Map(x => x.Long4).Column("Long4");
            this.Map(x => x.Long4Live).Column("Long4_Live");
            this.Map(x => x.Text1).Column("Text1");
            this.Map(x => x.Text1Live).Column("Text1_Live");
            this.Map(x => x.Text2).Column("Text2");
            this.Map(x => x.Text2Live).Column("Text2_Live");
            this.Map(x => x.Enum).Column("Enum");
            this.Map(x => x.EnumLive).Column("Enum_Live");
            // HasMany(x => x.FormElementChoices).KeyColumn("Form_Element_ID");
            //HasMany(x => x.FormElementCultures).KeyColumn("Form_Element_ID");
            //HasMany(x => x.SubmissionValues).KeyColumn("Form_Element_ID");
        }

        #endregion
    }
}